package com.bc.commonentity.log;

import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;

public class MsgInterceptor  extends AbstractPhaseInterceptor<Message> {

	public MsgInterceptor() {
		//接受参数时候调用
		super(Phase.RECEIVE);
	}
	//解密数据
	@Override
	public void handleMessage(Message message) throws Fault {
		String url = (String) message.get(Message.REQUEST_URL);
		if (!LogDetailHelper.needCheck(url)) {
			return;
		}
		AspectLogHelper.cxfBefore(message);
	}
}